Describe CROSSLIST option in TABLES statement?
Adding the CROSSLIST option to TABLES statement displays crosstabulation tables in ODS column format.
What is a PDV?
A PDV or Program Data Vector is a logical area in the memory. SAS creates a database of one observation at a time. At the time of compilation an input buffer is created which holds a record from and external file. The PDV is created following this input buffer creation.
How would you remove a format that has been permanently associated with a variable?
Explain what is the use of PROC gplot?
PROC gplot has more options and can create more colorful and fancier graphics.
Enthusiastic about exploring the skill set of SAS Training? Then, have a look at the blog post to gather additional knowledge.
What is the difference between One to One Merge and Match Merge? Give example also.
If both data sets in the merge statement are sorted by id(as shown below) and each observation in one data set has a corresponding observation in the other data set, a one-to-one merge is suitable.
data mydata1;
input id class $;
cards;
1 Sa
2 Sd
3 Rd
4 Uj
;
data mydata2;
input id class1 $;
cards;
1 Sac
2 Sdf
3 Rdd
4 Lks
;
data mymerge;
merge mydata1 mydata2;
run;
If the observations do not match, then match merging is suitable
data mydata1;
input id class $;
cards;
1 Sa
2 Sd
2 Sp
3 Rd
4 Uj
;
data mydata2;
input id class1 $;
cards;
1 Sac
2 Sdf
3 Rdd
3 Lks
5 Ujf
;
data mymerge;
merge mydata1 mydata2;
by id
run;
Describe an SAS function.
TRIM: removes trailing blanks from a character expression
data xyz; Str1 = ‘my’; Str2 = ‘dog’; Result = TRIM(Str1)||TRIM(Str2); run;
Which SAS Statement does not perform automatic conversions in comparisons?
Use the TABLES statement.
In SAS interviews it’s a good idea to try and keep your answers precise as this helps you come across as confident. Being able to answer questions succinctly is also a very clear indicator of your knowledge.
What is the difference between Merge and Proc SQL ?
The resultant dataset depends on the input datasets. In case of one to one and one to many both work similarly,i.e. the resultant dataset is same. But differs in case of many to many and non matching datasets: many to many: ex: (merge on x) (proc sql) X Y X Z X Y Z X Y Z ----- ------ ------- ------- 1 A 1 F 1 A F 1 A F 1 C 1 R ---> 1 C R 1 A R 2 B 2 G 2 B G 1 C F 1 C R 2 B G
NON MATCHING DATA:
ex: (merge on x) (proc sql) X Y X Z X Y Z X Y Z ----- ------ ------- ------- 1 A 1 F 1 A F 1 A F 2 B 3 T ---> 2 B . 3 C T 3 C 4 G 3 C T 4 . G
How will you write a code to create a sas dataset with no data in it/ Or How to validate a dataset without actual creating it?
Use OPTIONS OBS = 0
What is a PUT statement?
A PUT statement is a flexible tool in data step programming.
Examples of a PUT statement are:
PUT _all_ - writes the values of all variables
PUT 132*’_’ – writes 132 underscores
PUT one two three – writes three variable values separated by a space.
Mention the category in which SAS Informats are placed?
SAS informats are placed in three categories,
-Character Informats : $INFORMATw
-Numeric Informats : INFORMAT w.d
-Date/Time Informats: INFORMAT w.
What function CATX syntax does?
CATX syntax concatenate character strings remove trailing and leading blanks and inserts separators.
What is the difference between Order and Group variable in proc report?
-If the variable is used as group variable, rows that have the same values are collapsed.
-Group variables produce list report whereas order variable produces summary report.
How to specify variables to be processed by the FREQ procedure?
By using TABLES Statement.
Does SAS Translate? (compile) or does it ?Interpret?? Explain.
If you have a data set that contains 100 variables, but you need only five of those, what is the code to force SAS to use only those variable?
You liked the article?
Like: 0
Vote for difficulty
Current difficulty (Avg): Medium
TekSlate is the best online training provider in delivering world-class IT skills to individuals and corporates from all parts of the globe. We are proven experts in accumulating every need of an IT skills upgrade aspirant and have delivered excellent services. We aim to bring you all the essentials to learn and master new technologies in the market with our articles, blogs, and videos. Build your career success with us, enhancing most in-demand skills in the market.